<?php
/*
 * PHP Account creator for Trinity
 * Copyright (C) 2010 Shocker @ WoW.Freakz.ro
*/

$_THEME = "default";
$_LANGUAGE = "english";
$_PASS_LENGTH = array( // minimum/maximum length for password
    'min' => 1,
    'max' => 20
);
$_USER_LENGTH = array( // minimum/maximum length for user
    'min' => 1,
    'max' => 32
);
$_DB_CONFIG = array(
    'host' => 'localhost',
    'user' => 'root',
    'pass' => '',
    'db'   => 'auth'
);

ini_set("display_errors", 0);

// language
if (!file_exists("lang/{$_LANGUAGE}.php"))
    die("Invaild language file, please check your config file");
else
    include("lang/{$_LANGUAGE}.php");

// theme
if (!file_exists("themes/{$_THEME}/css.css"))
    die($_LANG['error_theme']);

// mysql connect
if (!mysql_connect($_DB_CONFIG['host'], $_DB_CONFIG['user'], $_DB_CONFIG['pass']) || !mysql_select_db($_DB_CONFIG['db']))
    die($_LANG['error_mysql']);
?>